﻿@model IEnumerable<GsifWeb4.Models.forum_gsif>

<h2>@ViewBag.HeaderText</h2>

<p>
    @Html.ActionLink("Skriv ett inlägg", "Create",  "Forum", new { forumType = ViewBag.ForumType }, null)
</p>

@{
     foreach (var message in Model) {
        <table>
                <tr class="spaceUnder">
                    <td><b>Namn:</b></td>
                    <td>@message.Namn</td>
                </tr>
                <tr>
                    <td><b>Epost:</b></td>
                    <td>@message.Epost</td>
                </tr>
                <tr>
                    <td><b>Hemsida:</b></td>
                    <td><a href = "@message.Adress">@message.Adress</a></td>
                </tr>
                <tr>
                    <td><b>Tid:</b></td>
                    <td>@message.Datum</td>
                </tr>                
              </table>
              <br />
                @Html.Raw(message.Text)
              <hr />
         }
        }


@*<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.ForumType)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Datum)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Namn)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Epost)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Adress)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Text)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Ip)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.ForumType)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Datum)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Namn)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Epost)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Adress)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Text)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Ip)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
    </tr>
}

</table>*@
